package org.obs.core.hibernate.operations;

import java.util.List;

import org.hibernate.Session;
import org.obs.core.HibernateOperation;
import org.obs.domain.EmailMessage;

public class GetMessagesOperation implements HibernateOperation<List<EmailMessage>> {

    public List<EmailMessage> execute(Session session) {
        String queryString = "from EmailMessage";
        return session.createQuery(queryString).list();
    }

}
